#include<stdio.h>
void main()
{
	char arr[100];
	char *p = arr;
	int i = 0;
	scanf("%s",&arr);
	while (*p != '\0')
	{
		if (*p == '1' || *p == '0')
		{
			i++;
		}
		*p++;
	}
	printf("%d",i);
}
